import Home from "../views/Home"
import {lazy} from "react"
const routes=[{
    path:"/home",
    component: Home,
    children:[{
        path:'/home/Homepage',
        component:lazy(()=>import('../views/home/Homepage')),
        title:"首页"
    },{
        path:'/home/Jingxi',
        component:lazy(()=>import('../views/home/Jingxi')),
        title:"惊喜"

    },{
        path:'/home/ShopCar',
        component:lazy(()=>import('../views/home/ShopCar'))   ,
        title:"购物车"    
    },
    {     path:'/home/fiyclass',
          component:lazy(()=>import('../views/home/Fiyclass'))  ,
          title:"分类"
    },
    {
           path:'/home/My',
           component:lazy(()=>import('../views/home/My')),
           title:"我的"
    }]
    
},{
    path:'/login',
    component:lazy(()=>import("../views/Login"))
},{
    path:'/details/:id',
    component:lazy(()=>import('../views/Details'))
},
{
    path:'/Adders',
    component:lazy(()=>import('../views/Adders'))
},
{
    path:'/Add',
    component:lazy(()=>import('../views/Add'))
},{
    path:'/',
    redirect: '/home/Homepage',  // 重定向:重新指向其它path,会改变网址
   
}]

export default routes